package com.arvin.skin;

import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.arvin.skin.core.SkinManager;

import java.io.File;
import java.lang.reflect.Field;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        getSupportFragmentManager().beginTransaction().add(R.id.frameLayout,new MyFragment()).commit();


    }

    public void reset(View view) {
        SkinManager.getInstance().loadSkin("");
    }

    public void change(View view) {
        String path = Environment.getExternalStorageDirectory()+ File.separator + "app-skin-debug.apk";
        SkinManager.getInstance().loadSkin(path);
    }
}
